//
//  XMJobSelectViewController.m
//  XMJJ_zml
//
//  Created by apple on 2025/5/19.
//

#import "XMJobSelectViewController.h"
#import "XMJobSelectView.h"

#import "XMRealNameAuthenViewController.h"
#import "XMJobListViewController.h"

@interface XMJobSelectViewController ()

@property (nonatomic, copy) NSString *jobStr;

@end

@implementation XMJobSelectViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    [self creatUI];
}

- (void)creatUI {
    XMJobSelectView *jobSelectView = [[XMJobSelectView alloc] initWithFrame:self.view.bounds];
    [self.view addSubview:jobSelectView];
    
    XMWeakSelf;
    jobSelectView.fucSelectBlock = ^(NSInteger fucItem) {
        if (fucItem == 0) {
            XMRealNameAuthenViewController *realNameAuthenVC = [[XMRealNameAuthenViewController alloc] init];
            [weakSelf.navigationController pushViewController:realNameAuthenVC animated:YES];
        }
        else {
            XMJobListViewController *jobListVC = [[XMJobListViewController alloc] init];
            [weakSelf.navigationController pushViewController:jobListVC animated:YES];
            jobListVC.jobSelectBlock = ^(NSString * _Nonnull jobStr) {
                weakSelf.jobStr = jobStr;
            };
        }
    };
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
